//
//  NSNumber+Extension.swift
//  VO_Yuejie
//
//  Created by laichunhui on 15/12/4.
//  Copyright © 2015年 lch. All rights reserved.
//

import Foundation

/*
    let format = String(format:"%.2f",b)
    print("double:\(format)")
 */
public extension Int {
    
    func format(f: String) -> String {
        return String(format: "%\(f)d", self)
    }
}

public extension Double {
    
    func format(f: String) -> String {
        return String(format: "%\(f)f", self)
    }
}